package com.twu.bm.football;

import org.junit.Test;

import java.io.PrintStream;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

public class ListOptionTest {

    PrintStream printStream = mock(PrintStream.class);
    League leagueMock = mock(League.class);
    ListOption listOption = new ListOption(printStream, leagueMock);

    @Test
    public void shouldCallPrintOnLeagueWhenPerformingAction() {
        listOption.performAction();
        verify(leagueMock).print(printStream);
    }
}
